package com.pateo.retail.canal.model;


import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pateo.retail.canal.constant.CommonConstants;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 线索客户主表
 *
 * @author gujiachun
 */

@Data
public class CustomerInfo implements Serializable {

    /**
     * 主键
     */
    @Column(name = "sid")
    @JSONField(serialize = false)
    private Long sid;

    @Column(name = "tenant_code")
    private String tenant_code;

    @Column(name = "tenant_account_id")
    private Long tenant_account_id;

    @Column(name = "org_code")
    private String org_code;

    @Column(name = "wx_open_id")
    private String wx_open_id;

    @Column(name = "channel_source")
    private Long channel_source;

    @Column(name = "channel_source_name")
    private String channel_source_name;

    @Column(name = "follow_date")
    @JSONField(format= CommonConstants.DATA_FORMAT)
    private Date follow_date;

    @Column(name = "following_flag")
    private Integer following_flag;

    @Column(name = "channel_type")
    private String channel_type;

    @Column(name = "channel_value")
    private String channel_value;

    @Column(name = "version")
    private Integer version;

    @Column(name = "create_by")
    private String create_by;

    @Column(name = "create_date")
    @JSONField(format = CommonConstants.DATA_FORMAT)
    private Date create_date;

    @Column(name = "update_by")
    private String update_by;

    @Column(name = "update_date")
    @JSONField(format = CommonConstants.DATA_FORMAT)
    private Date update_date;

    @Column(name = "customer_flag")
    private Long customer_flag;

    @Column(name = "follow_up_person")
    private String follow_up_person;

    @Column(name = "last_follow_time")
    @JSONField(format = CommonConstants.DATA_FORMAT)
    private Date last_follow_time;

    @Column(name = "next_follow_time")
    @JSONField(format = CommonConstants.DATA_FORMAT)
    private Date next_follow_time;

    @Column(name = "read_flag")
    private Integer read_flag;

    @Column(name = "last_result_sid")
    private Integer last_result_sid;

    @Column(name = "last_result_name")
    private String last_result_name;

    @Column(name = "clue_level_sid")
    private Integer clue_level_sid;

    @Column(name = "clue_level_name")
    private String clue_level_name;

    @Column(name = "phone")
    private String phone;

    @Column(name = "delete_flag")
    private Integer delete_flag;

    @Column(name = "task_flag")
    private Integer task_flag;

    @Column(name = "follow_count")
    private Integer follow_count;

    private ParentCustomerJoinInfo customer_join_info;

}